﻿Partial Public Class MenuAdmin
    Inherits System.Web.UI.UserControl
    Private usrhelp As New Helpers.User
    Private cmnhelp As New Helpers.Common
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Dim role As String = usrhelp.GetRole()
        'Dim nav As HtmlGenericControl = DirectCast(Me.FindControl("nav" & role), HtmlGenericControl)
        'nav.Visible = True
        'Dim selPage As String = Request.Path.Substring(Request.Path.LastIndexOf("/")).Replace("/", String.Empty)
        'Dim selItem As String = "lnk" & role & "Default"
        'If Not String.IsNullOrEmpty(selPage) AndAlso selPage.EndsWith(".aspx") Then selItem = "lnk" & role & selPage.Replace(".aspx", String.Empty)
        'cmnhelp.ResetMenu(nav, selItem)
        Dim nav As HtmlGenericControl = DirectCast(Me.FindControl("nav"), HtmlGenericControl)
        Dim selPage As String = Request.Path.Substring(Request.Path.LastIndexOf("/")).Replace("/", String.Empty)
        Dim selItem As String = "lnkdefault"
        If Not String.IsNullOrEmpty(selPage) AndAlso selPage.EndsWith(".aspx") Then selItem = "lnk" & selPage.Replace(".aspx", String.Empty).ToLower
        cmnhelp.ResetMenu(nav, selItem)
    End Sub
End Class